package game.ui.core
{
	import engine.asset.*;
	import engine.core.*;
	import game.ui.controls.*;
	
	public class RxDialogSequencer
	{
		private var m_dialog:RxQuestMessageDialog;
		private var m_sequenceId:String;
		private var m_playing:Boolean;
		private var m_currentTextId:String;
		private var m_callback:Function;
		private var m_questId:String;
		private var m_taskIndex:int;
		private static var s_questTextCSV:RxAssetCSV;
		
		public function RxDialogSequencer()
		{
			if (!s_questTextCSV)
			{
				s_questTextCSV = RxAssetCSV.GetByName("questtext");
				if (!s_questTextCSV)
				{
					RxLog.Error("(RxQuestDialogSequencer): Error loading questtext data file");
				}
			}
		}
		
		public function ExitDialogSequence(param1:Boolean = true) : void
		{
			this.m_playing = false;
			this.m_dialog.Close();
			if (param1)
			{
				if (this.m_callback != null)
				{
					this.m_callback(this);
				}
			}
			this.m_dialog.SetCallback(null);
			this.m_currentTextId = null;
		}
	}
}